#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	string x, y;
	cin >> x >> y;
	if (x.size() < y.size())
		swap(x, y);
	reverse(x.begin(), x.end());
	reverse(y.begin(), y.end());

	vector<int> a(5000), b(5000), c(10005);
	for (int i = 0; i < x.size(); i++)
		a[i] = x[i] - '0';
	for (int i = 0; i < y.size(); i++)
		b[i] = y[i] - '0';

	for (int i = 0; i < 5000; i++) {
		for (int j = 0; j < 5000; j++) {
			c[i + j] += a[i] * b[j];
//			for (int k = i; k < 5000; k++) {
//				if (c[k] < 10)	break;
//				c[k + 1] += c[k] / 10;
//				c[k] %= 10;
//			}
		}
	}

	for (int i = 0; i < 4999; i++) {
//		cout << endl << c[i] << endl;

		c[i + 1] += c[i] / 10;
		c[i] %= 10;
	}

	int index;
	reverse(c.begin(), c.end());
	for (index = 0; !c[index] && index < 10005; index++);
	if (index != 10005)
		for (int i = index; i < 10005; i++)
			cout << c[i];
	else
		cout << "0";
	return 0;
}
